xiaozu_id = "十组"

YZQ_name = "杨子琪"
YZQ_id = "1"
YZQ_roLe = "项目经理"
XMR_name = "辛孟芮"
XMR_id = "2"
XMR_roLe = "权限开发员"
ZTX_name = "张天香"
ZTX_id = "3"
ZTX_roLe = "测试员"
SYD_name = "孙优丹"
SYD_id = "4"
SYD_roLe = "莱单开发员"

def A():
    global YZQ_name, YZQ_id, YZQ_roLe, XMR_name, XMR_id, XMR_roLe, ZTX_name, ZTX_id, ZTX_roLe, SYD_name, SYD_id, SYD_roLe
    YZQ_name = input("请输入成员1姓名：")
    YZQ_id = input("请输入成员1学号：")
    YZQ_roLe = input("请输入成员1角色：")
    XMR_name = input("请输入成员2姓名：")
    XMR_id = input("请输入成员2学号：")
    XMR_roLe = input("请输入成员2角色：")
    ZTX_name = input("请输入成员3姓名：")
    ZTX_id = input("请输入成员3学号：")
    ZTX_roLe = input("请输入成员3角色：")
    SYD_name = input("请输入成员4姓名：")
    SYD_id = input("请输入成员4学号：")
    SYD_roLe = input("请输入成员4角色：")
    print(f"{xiaozu_id}：学生信息已更新！")
    print(f"{xiaozu_id}：更新后的成员信息如下：")
    print(f"姓名：{YZQ_name},学号：{YZQ_id},角色：{YZQ_roLe}\n姓名：{XMR_name},学号：{XMR_id},角色：{XMR_roLe}\n姓名：{ZTX_name},学号：{ZTX_id},角色：{ZTX_roLe}\n姓名：{SYD_name},学号：{SYD_id},角色：{SYD_roLe}")

def B():
    name1 = input("请输入要查询的姓名：")
    if name1 != "杨子琪" and name1 != "辛孟芮" and name1 != "张天香" and name1 != "孙优丹":
        print(f"{xiaozu_id}： {name1} 无有效权限！")
    elif name1 == "杨子琪":
        print(f"{xiaozu_id}: {name1} 有权限删除数据！")
    elif name1 == "辛孟芮":
        print(f"{xiaozu_id}: {name1} 有权限开发数据！")
    elif name1 == "张天香":
        print(f"{xiaozu_id}: {name1} 有权限测试数据！")
    elif name1 == "孙优丹":
        print(f"{xiaozu_id}: {name1} 有权限设计菜单！")

def C():
    print(f"{xiaozu_id}：成员信息如下：")
    print(f"姓名：{YZQ_name},学号：{YZQ_id},角色：{YZQ_roLe}\n姓名：{XMR_name},学号：{XMR_id},角色：{XMR_roLe}\n姓名：{ZTX_name},学号：{ZTX_id},角色：{ZTX_roLe}\n姓名：{SYD_name},学号：{SYD_id},角色：{SYD_roLe}")

def D():
    name2 = input("请输入操作者姓名：")
    id2 = input("请输入操作者学号：")
    role2 = input("请输入操作者角色：")
    if role2 == "项目经理":
        name3 = input("请输入要删除的姓名:")
        global YZQ_name, YZQ_id, YZQ_roLe, XMR_name, XMR_id, XMR_roLe, ZTX_name, ZTX_id, ZTX_roLe, SYD_name, SYD_id, SYD_roLe
        if name3 == YZQ_name:
            YZQ_name = ""
            YZQ_id = ""
            YZQ_roLe = ""
        elif name3 == XMR_name:
            XMR_name = ""
            XMR_id = ""
            XMR_roLe = ""
        elif name3 == ZTX_name:
            ZTX_name = ""
            ZTX_id = ""
            ZTX_roLe = ""
        elif name3 == SYD_name:
            SYD_name = ""
            SYD_id = ""
            SYD_roLe = ""
        print(f"{xiaozu_id}: {name3} 的信息已删除！")
    else:
        print(f"{xiaozu_id}: 无权限删除其他成员信息！")

def E():
    print(f"{xiaozu_id}: 程序已退出！")
    exit()

while True:
    name = input(f"请输入正在操作的{xiaozu_id}的成员姓名：")
    if name != "杨子琪" and name != "辛孟芮" and name != "张天香" and name != "孙优丹":
        print(f"错误： {name} 不是{xiaozu_id}的成员!")
    else:
        i = int(input(f"请输入{xiaozu_id}的操作:（1_{xiaozu_id}_更新学生信息,2_{xiaozu_id}_查询学生信息,3_{xiaozu_id}_展示学生信息,4_{xiaozu_id}_删除学生信息,5_{xiaozu_id}_退出程序）："))
        match i:
            case 1:
                A()
            case 2:
                B()
            case 3:
                C()
            case 4:
                D()
            case 5:
                E()